package com.jiang.mall.auth.feign;

import com.jiang.common.to.LoginTo;
import com.jiang.common.to.SocialUser;
import com.jiang.common.to.UserRegistTo;
import com.jiang.common.utils.R;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

@FeignClient("mall-member")
public interface MemberFeignService {

    @PostMapping("/member/member/register")
    public R register(@RequestBody UserRegistTo userRegisterVo);

    @PostMapping("/member/member/login")
    public R login(@RequestBody LoginTo loginTo);

    @PostMapping("/member/member/oauth2/login")
    public R oauth2Login(@RequestBody SocialUser socialUser);
}
